/*
 *	Copyright © 2013 Changsha Shishuo Network Technology Co., Ltd. All rights reserved.
 *	长沙市师说网络科技有限公司 版权所有
 *	http://www.shishuo.com
 */

package com.hlingsoft.cms.dao;

import com.hlingsoft.cms.entity.Consignee;
import com.hlingsoft.cms.entity.Image;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 收货人配置
 * 
 * @author Zhangjiale
 * 
 */

@Repository
public interface ConsigneeDao {


	/**
	 * 添加收货人
	 * @param consignee
	 * @return
	 */
	public long addConsignee(Consignee consignee);


	/**
	 * 查找用户的收件人
	 * @param appUserId
	 * @return
	 */
	public List<Consignee> getConsigneeByAppUserId(@Param("appUserId") long appUserId);


	public List<Consignee> getConsigneeByAppUserIdWithNone(@Param("appUserId") long appUserId);

	/**
	 * 通过id查找
	 * @param consigneeId
	 * @return
	 */
	public Consignee getConsigneeById(@Param("consigneeId") long consigneeId);

	/**
	 * 更新收货人
	 * @param consignee
	 * @return
	 */
	public int updateConsignee(Consignee consignee);

	/**
	 * 获取用户的默认简历
	 * @param appUserId
	 * @return
	 */
	public Consignee getDefaultConsigneeByAppUserId(@Param("appUserId") long appUserId );


	/**
	 * 根据id删除
	 * @param id
	 * @return
	 */
	public int deleteConsigneeById(@Param("id") long id);



}
